﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using CommonSense.UI.Shell.ViewModels;
using System.ComponentModel;
using CommonSense.UI.Shell.Interfaces;

namespace CommonSense.UI.Startup.ViewModels
{
    class Test1ViewModel : BaseViewModel, IRefreshable, ISaveable
    {
        private string someText;

        public string SomeText
        {
            get { return this.someText; }
            set
            {
                if (this.someText != value)
                {
                    this.someText = value;
                    this.OnPropertyChanged();
                    this.IsDirty = true;
                }
            }
        }

        public Test1ViewModel()
        {
            this.Title = "Test1";
        }

        protected override void OnClosing(CancelEventArgs args)
        {
            base.OnClosing(args);
        }

        protected override void OnClosed()
        {
            base.OnClosed();
        }

        public void Refresh()
        {
            this.IsDirty = false;
        }

        public void Save()
        {
            this.IsDirty = false;
        }
    }
}
